<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page language="java" import="java.util.*,java.lang.*"%>
<%@ page import="sg.edu.nus.iss.phoenix.user.entity.User"%>
<html>
<head>
<link href="<c:url value='/css/main.css'/>" rel="stylesheet"
	type="text/css" />
<fmt:setBundle basename="ApplicationResources" />
<c:set var="t" value="true" />
<title>Presenter Page<fmt:message key="title.login" />
</title>
<script type="text/javascript" src="../script/jquery.js"></script>
<script type="text/javascript">

$(document).ready(function(){
	
	$(('input:radio[name=prst]')).change(function(){
		
		 window.opener.document.getElementById('presenterid').value= $(this).attr("id");
		 window.opener.document.getElementById('presentername').value= $(this).val();
		 self.close();
	});
		
	});


</script>
</head>
<body>
	<div class="applicationTitle" align="center" width="100%">
		<fmt:message key="title.application" />
	</div>
	<br />
	<div style="font-size: 20px;">
		<fmt:message key="label.presenter" />
	</div>
	<br />
	<table>
		<%
					 List dataList = null;  
				       dataList = (List) session.getAttribute("presenterList"); 
				       for(int i=0; i < dataList.size(); i++)
				       {  
				    	   User u = (User)dataList.get(i);
				      %>
		<tr>
			<td><input type="radio" id='<%= u.getId()%>' name="prst"
				value='<%= u.getName()%>'
				 />
			</td>
			<td><%= u.getName() %></td>
		<tr>
			<% 				    	    
				       }
					 %>
		
	</table>
</body>